<template>
  <view :style="themeColor">
    <view class="page">
      <fu-custom bgColor="bg-white" :isBack="true" :isBottom="true">
        <block slot="content">订单详情</block>
      </fu-custom>
      <l-painter :css='{"width":`550rpx`,"height":`700rpx`,"background":`#fff`}' ref="painter1691111604909"
        :hidden='true' file-type='png' path-type='url'>
        <template v-if="painterParam1691111604909">
          <l-painter-image :css='{"width":`432rpx`,"height":`452rpx`,"position":`absolute`,"top":`0rpx`,"left":`55rpx`}'
            :src='canvasMessage.thumb'></l-painter-image>
          <l-painter-qrcode
            :css='{"width":`200rpx`,"height":`200rpx`,"position":`absolute`,"top":`482rpx`,"left":`296rpx`}'
            :text="'这是文字'"></l-painter-qrcode>
          <l-painter-text :css='{"position":`absolute`,"top":`548rpx`,"left":`72rpx`,"width":`188rpx`,"line-clamp":`2`}'
            :text="canvasMessage.name"></l-painter-text>
          <l-painter-view
            :css='{"width":`200rpx`,"height":`200rpx`,"position":`absolute`,"top":`0rpx`,"left":`2rpx`}'></l-painter-view>

        </template>
      </l-painter>
      <benben-popup v-model="popupShow1679645673274" :mask="true" :mask-close-able="true" mode='bottom'>
        <!---分享到相册flex布局开始-->
        <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
          <view class='flex flex-direction flex-wrap align-stretch formed_fd2_0'>
            <view class='flex flex-wrap align-center justify-between formed_fd2_0_c0'>
              <view class='flex flex-wrap align-center formed_fd2_0_c0_c0'>
              </view>
              <view class='flex flex-wrap align-center justify-center'>
                <image class='formed_fd2_0_c0_c1_c0' mode="aspectFit" :src='STATIC_URL+"479.png"'></image>
                <text class='formed_fd2_0_c0_c1_c1'>保存到相册</text>
                <image class='formed_fd2_0_c0_c1_c0' mode="aspectFit" :src='STATIC_URL+"480.png"'></image>
              </view>
              <view class='flex flex-wrap align-center' @tap.stop="popupShow1679645673274=false">
                <image class='formed_fd2_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"129.png"'></image>
              </view>
            </view>
            <view class='flex flex-wrap align-center justify-center'>
              <view class='flex flex-direction flex-wrap align-stretch justify-around formed_fd2_0_c1_c0'>
                <image class='formed_fd2_0_c1_c0_c0' mode="aspectFit" :src='shearImg'></image>
              </view>
            </view>
            <view class='flex flex-wrap align-center justify-center formed_fd2_0_c2'>
              <button class='formed_fd2_0_c2_c0' @tap.stop="SavePictureFunc()">保存图片</button>
            </view>
          </view>
        </view>

        <!---分享到相册flex布局结束-->

      </benben-popup>
      <!---订单flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout formed_flex_3">
        <view class='flex flex-wrap align-center formed_fd3_0'>
          <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
            <text class='formed_fd3_0_c0_c0' v-if="dataDetails.group_info.activity_status=='0'">订单待成团</text><text
              class='formed_fd3_0_c0_c0' v-if="dataDetails.group_info.activity_status=='1'">订单已成团</text><text
              class='formed_fd3_0_c0_c0'
              v-if="dataDetails.group_info.activity_status=='2'">{{dataDetails.group_info.status_txt}}</text>
          </view>
          <image class='formed_fd3_0_c1' mode="aspectFit" :src='STATIC_URL+"338.png"'
            v-if="dataDetails.group_info.activity_status=='0'"></image>
          <image class='formed_fd3_0_c1' mode="aspectFit" :src='STATIC_URL+"339.png"'
            v-if="dataDetails.group_info.activity_status=='1'"></image>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch formed_fd3_1'>
          <view class='flex flex-wrap align-center'>
            <image class='formed_fd3_1_c0_c0' mode="aspectFit" :src='STATIC_URL+"340.png"'></image>
            <view class='flex flex-wrap align-center' v-if=" dataDetails.group_info.activity_status==0">
              <text class='formed_fd3_1_c0_c1_c0'>拼团中，还差</text>
              <text class='formed_fd3_1_c0_c1_c1'>{{dataDetails.group_info.group_members_nums}}</text>
              <text class='formed_fd3_1_c0_c1_c1'>人</text>
              <text class='formed_fd3_1_c0_c1_c0'>拼成，剩：</text>
              <view class='flex flex-wrap align-center formed_fd3_1_c0_c1_c4'>
                <benben-countdown class=' formed_fd3_1_c0_c1_c4_c0' :show-day='false' :time-type='false'
                  :count-time="dataDetails.group_info.join_timeout">
                  <template #default="{ d, h, i, s }">
                    <text>{{h}}</text>

                    <text>:</text>

                    <text>{{i}}</text>

                    <text>:</text>

                    <text>{{s}}</text>

                    <text></text>
                  </template>
                </benben-countdown>
              </view>
              <text class='formed_fd3_1_c0_c1_c0'>结束</text>
            </view>
            <text class='formed_fd3_1_c0_c1_c0' v-if=" dataDetails.group_info.activity_status=='1'">拼团成功</text><text
              class='formed_fd3_1_c0_c1_c0' v-if=" dataDetails.group_info.activity_status=='2'">拼团失败</text>
          </view>
          <view class='flex flex-wrap align-center justify-center formed_fd3_1_c1'>
            <template v-for='(item,key0) in dataDetails.group_user'>
              <view class='flex flex-wrap align-center self-center justify-center formed_fd3_1_c1_c0' :key='key0'>
                <image class='formed_fd3_1_c1_c0_c0' mode="aspectFit" :src='item.user_head' v-if=" item.user_id!=''">
                </image>
                <image class='formed_fd3_1_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"341.png"'
                  v-if=" item.user_id==''"></image>
                <button class='formed_fd3_1_c1_c0_c1' v-if=" key0==0">拼主</button>
              </view>
            </template>

          </view>
        </view>
        <view class='flex flex-wrap align-center formed_fd3_2'>
          <image class='formed_fd3_2_c0' mode="aspectFit" :src='STATIC_URL+"284.png"'></image>
          <view class='flex flex-direction flex-wrap align-stretch flex-sub formed_fd3_2_c1'>
            <view class='flex flex-wrap align-center'>
              <text class='formed_fd3_2_c1_c0_c0'>{{dataDetails.order_info.label_name}}</text>
              <text class='formed_fd3_2_c1_c0_c1'>{{dataDetails.order_info.receiver_name}}</text>
              <text class='formed_fd3_2_c1_c0_c2'>{{dataDetails.order_info.receiver_mobile}}</text>
            </view>
            <view class='flex flex-wrap align-center formed_fd3_2_c1_c1'>
              <view class='flex-sub'>
                <text class='formed_fd3_2_c1_c1_c0_c0'>{{dataDetails.order_info.province}}</text>
                <text class='formed_fd3_2_c1_c1_c0_c0'>{{dataDetails.order_info.city}}</text>
                <text class='formed_fd3_2_c1_c1_c0_c0'>{{dataDetails.order_info.district}}</text>
                <text class='formed_fd3_2_c1_c1_c0_c3'>{{dataDetails.order_info.receiver_address}}</text>
              </view>
            </view>
          </view>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch formed_fd3_3'>
          <view class='flex flex-direction align-stretch formed_fd3_3_c0'>
            <template v-for='(item,key0) in dataDetails.order_goods_list'>
              <view class='flex flex-wrap align-stretch formed_fd3_3_c0_c0' :key='key0'>
                <image class='formed_fd3_3_c0_c0_c0' mode="aspectFill" :src='item.goods_thumb'></image>
                <view class='flex flex-direction align-stretch flex-sub formed_fd3_3_c0_c0_c1'>
                  <text class='formed_fd3_3_c0_c0_c1_c0'>{{item.goods_name}}</text>
                  <text class='formed_fd3_3_c0_c0_c1_c1'>{{item.sku_name}}</text>
                  <view class='flex flex-wrap align-center justify-between'>
                    <view class='flex flex-wrap align-center'>
                      <text class='formed_fd3_3_c0_c0_c1_c2_c0_c0'>￥</text>
                      <text class=' formed_fd3_3_c0_c0_c1_c2_c0_c1'>
                        <text class=' formed_price1_fd3_3_c0_c0_c1_c2_c0_c1'>{{ item.shop_price | frontPrice }}</text>
                        <text class=' formed_price2_fd3_3_c0_c0_c1_c2_c0_c1'>{{ item.shop_price | laterPrice }}</text>
                      </text>
                    </view>
                    <view class='flex flex-wrap align-center formed_fd3_3_c0_c0_c1_c2_c1'>
                      <text>x</text>
                      <text>{{item.num}}</text>
                    </view>
                  </view>
                </view>
              </view>
            </template>

          </view>
          <view class='flex flex-wrap align-center justify-end formed_fd3_3_c0_c0'>
            <text class='formed_fd3_3_c1_c0'>商品总额</text>
            <text class='formed_fd3_3_c1_c1'>￥</text>
            <text class=' formed_fd3_3_c1_c2'>
              <text class=' formed_price2_fd3_3_c0_c0_c1_c2_c0_c1'>{{ dataDetails.order_money | frontPrice }}</text>
              <text class=' formed_price2_fd3_3_c0_c0_c1_c2_c0_c1'>{{ dataDetails.order_money | laterPrice }}</text>
            </text>
          </view>
          <view class='flex flex-wrap align-center justify-end formed_fd3_3_c2'>
            <text class='formed_fd3_3_c1_c0'>运费</text>
            <text class='formed_fd3_3_c1_c1'>￥</text>
            <text class=' formed_fd3_3_c1_c2'>
              <text
                class=' formed_price2_fd3_3_c0_c0_c1_c2_c0_c1'>{{ dataDetails.order_info.express_price | frontPrice }}</text>
              <text
                class=' formed_price2_fd3_3_c0_c0_c1_c2_c0_c1'>{{ dataDetails.order_info.express_price | laterPrice }}</text>
            </text>
          </view>
          <view class='flex flex-wrap align-center justify-end formed_fd3_3_c3'>
            <text class='formed_fd3_3_c3_c0'>实付款</text>
            <text class='formed_fd3_3_c3_c1'>￥</text>
            <text class=' formed_fd3_3_c3_c2'>
              <text class=' formed_price1_fd3_3_c0_c0_c1_c2_c0_c1'>{{ dataDetails.payable_money | frontPrice }}</text>
              <text class=' formed_price2_fd3_3_c3_c2'>{{ dataDetails.payable_money | laterPrice }}</text>
            </text>
          </view>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch formed_fd3_4'>
          <view class='flex flex-wrap align-center formed_fd3_4_c0'>

            <view class='flex  formed_fd3_4_c0_c0'></view>

            <text class='formed_fd3_4_c0_c1'>订单信息</text>
          </view>
          <view class='flex flex-wrap align-start formed_fd3_3_c0_c0'>
            <text class='formed_fd3_4_c1_c0'>订单备注</text>
            <text class='flex-sub formed_fd3_4_c1_c1'
              v-if="dataDetails.order_info.remark!=''">{{dataDetails.order_info.remark}}</text><text
              class='flex-sub formed_fd3_4_c1_c1' v-if="dataDetails.order_info.remark==''">无</text>
          </view>
          <view class='flex flex-wrap align-stretch formed_fd3_4_c2'>
            <text class='formed_fd3_3_c0_c0_c1_c2_c1'>订单编号</text>
            <text class='formed_fd3_4_c2_c1'>{{dataDetails.order_sn}}</text>
            <text class='formed_fd3_4_c2_c2' @tap.stop="copyText(dataDetails.order_sn)">复制</text>
          </view>
          <view class='flex flex-direction flex-wrap align-stretch'>
            <view class='flex flex-wrap align-center formed_fd3_3_c0_c0'>
              <text class='formed_fd3_4_c3_c0_c0'>下单时间</text>
              <text class='formed_fd3_2_c1_c1_c0_c3'>{{dataDetails.create_time}}</text>
            </view>
            <view class='flex flex-wrap align-center formed_fd3_3_c0_c0'>
              <text class='formed_fd3_4_c3_c0_c0'>付款金额</text>
              <text class='formed_fd3_4_c3_c1_c1'>￥</text>
              <text class=' formed_fd3_4_c3_c1_c2'>
                <text class=' formed_price1_fd3_4_c3_c1_c2'>{{ dataDetails.payable_money | frontPrice }}</text>
                <text class=' formed_price1_fd3_4_c3_c1_c2'>{{ dataDetails.payable_money | laterPrice }}</text>
              </text>
            </view>
            <view class='flex flex-wrap align-center formed_fd3_3_c0_c0'>
              <text class='formed_fd3_4_c3_c0_c0'>支付方式</text>
              <text class='formed_fd3_4_c3_c2_c1'>{{dataDetails.pay_type_str}}</text>
            </view>
            <view class='flex flex-wrap align-center formed_fd3_3_c0_c0'>
              <text class='formed_fd3_4_c3_c0_c0'>支付时间</text>
              <text class='formed_fd3_2_c1_c1_c0_c3'>{{dataDetails.pay_time}}</text>
            </view>
          </view>
        </view>
        <view class='flex flex-wrap align-center justify-end formed_fd3_5'
          v-if=" dataDetails.group_info.activity_status==0">
          <button class='formed_fd3_5_c0' @tap.stop="popupShow1680503276268=true">邀请好友</button>
        </view>
      </view>

      <!---订单flex布局结束-->
      <benben-popup v-model="popupShow1680503276268" :mask="true" :mask-close-able="true" mode='bottom'>
        <!---fxflex布局开始-->
        <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
          <view class='flex flex-direction flex-wrap align-stretch formed_fd4_0'>
            <view class='flex flex-wrap align-center justify-between formed_fd4_0_c0'>
              <view class='flex flex-wrap align-center formed_fd4_0_c0_c0'>
              </view>
              <view class='flex flex-wrap align-center justify-center formed_fd4_0_c0_c1'>
                <image class='formed_fd4_0_c0_c1_c0' mode="aspectFit" :src='STATIC_URL+"481.png"'></image>
                <text class='formed_fd4_0_c0_c1_c1'>分享到</text>
                <image class='formed_fd4_0_c0_c1_c0' mode="aspectFit" :src='STATIC_URL+"480.png"'></image>
              </view>
              <view class='flex flex-wrap align-center formed_fd4_0_c0_c2'>
                <image class='formed_fd4_0_c0_c2_c0' mode="aspectFit" :src='STATIC_URL+"129.png"'
                  @tap.stop="popupShow1665473105743=false"></image>
              </view>
            </view>
            <view class='flex flex-wrap align-center justify-around formed_fd4_0_c1'>
              <view class='flex flex-direction flex-wrap align-center' @tap="clickShearFunc(1)">
                <image class='formed_fd4_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"174.png"'></image>
                <text class='formed_fd4_0_c1_c0_c1'>微信好友</text>
              </view>
              <view class='flex flex-direction flex-wrap align-center' @tap="clickShearFunc(2)">
                <image class='formed_fd4_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"175.png"'></image>
                <text class='formed_fd4_0_c1_c0_c1'>朋友圈</text>
              </view>
              <view class='flex flex-direction flex-wrap align-center' @tap="clickShearFunc(3)">
                <image class='formed_fd4_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"94.png"'></image>
                <text class='formed_fd4_0_c1_c0_c1'>复制链接</text>
              </view>
              <view class='flex flex-direction flex-wrap align-center' @tap="clickShearFunc(4)">
                <image class='formed_fd4_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"155.png"'></image>
                <text class='formed_fd4_0_c1_c0_c1'>分享海报</text>
              </view>
            </view>
          </view>
        </view>

        <!---fxflex布局结束-->

      </benben-popup>


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},


    data() {
      return {
        "popupShow1680503276268": false,
        "popupShow1679645673274": false,
        "painterParam1691111604909": false,
        "cut": "1",
        "dataDetails": {
          "aid": "",
          "order_sn": "",
          "order_money": "",
          "payable_money": "",
          "coupon_id": "",
          "coupon_money": "",
          "send_time": "",
          "receive_time": "",
          "pay_time": "",
          "discount_money": "",
          "create_time": "",
          "pay_type": "",
          "status": "",
          "pay_type_str": "",
          "order_info": {
            "receiver_mobile": "",
            "receiver_address": "",
            "receiver_name": "",
            "remark": "",
            "province": "",
            "city": "",
            "district": "",
            "sex": "",
            "label_name": "",
            "express_price": "",
            "pickup_code": "",
            "pickup_img": ""
          },
          "order_goods_list": [],
          "shop_info": {
            "aid": "",
            "store_name": "",
            "store_logo": "",
            "store_logo_id": ""
          },
          "btn_list": {
            "cancel_order": "",
            "go_pay": "",
            "remind_send": "",
            "remind_already": "",
            "apply_invoice": "",
            "view_invoice": "",
            "apply_refund": "",
            "view_logistics": "",
            "confirm_receive": "",
            "evaluate": "",
            "delete_order": "",
            "pay_balance": ""
          },
          "is_multiple_package": "",
          "order_type": "",
          "advance_sn": "",
          "usermerchant_id": "",
          "discount_str": "",
          "surplus_receive_time": "",
          "group_info": {
            "join_timeout": "",
            "activity_status": "",
            "group_members_nums": "",
            "join_number": "",
            "status_txt": ""
          },
          "group_user": [],
          "real_money": "",
          "cancel_surplus_second": "",
          "balance_payment_stime": "",
          "balance_payment_etime": "",
          "receive_surplus_time": "",
          "goods_total": "",
          "pay_status": ""
        },
        "canvasMessage": {
          "thumb": "",
          "name": "",
          "goods_id": "",
          "sku_id": "",
          "activity_id": ""
        },
        "shearInfo": {
          "url": "",
          "qrcode_url": ""
        },
        "shearImg": "",
        "order_id": "1065",
        "order_sn": "GD230625110352495871"
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },
      /**
       * @returns
       * Android       安卓
       * IOS       苹果
       * Web       H5 或 pc
       * Wechat       微信小程序
       * Alipay       支付宝小程序
       * Baidu       百度小程序
       * ByteBounce       抖音小程序
       * 360       360小程序
       * FastApp       快应用
       */
      appSystemIdentification() {
        return this.$store.state.appSystemIdentification
      }
    },
    watch: {},
    onLoad(options) {
      let {
        order_id,
        order_sn
      } = options
      if (order_id !== undefined) this.order_id = order_id
      if (order_sn !== undefined) this.order_sn = order_sn
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getDetailFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //订单-订单详情
      async getDetailFunc() {
        //请求方法
        //数据验证

        let datadataDetails = await this.$api.post(global.apiUrls.post62c92b9d5ada3, {
          order_sn: this.order_sn,
          order_id: this.order_id
        });

        if (datadataDetails.data.code != 1) {
          this.$message.info(datadataDetails.data.msg);
          return
        }
        let infodataDetails = datadataDetails.data;
        this.dataDetails = infodataDetails.data

        for (let i = 0; i < this.dataDetails.group_info.group_members_nums; i++) {
          this.dataDetails.group_user.push({
            user_id: '',
            user_name: '',
            user_head: ''
          })
        }
      },
      //点击分享
      async clickShearFunc(type) {
        if (type == '1') {
          this.canvasMessage.name = this.dataDetails.order_goods_list[0].goods_name
          this.canvasMessage.thumb = this.dataDetails.order_goods_list[0].goods_thumb
          this.canvasMessage.goods_id = this.dataDetails.order_goods_list[0].goods_id
          this.canvasMessage.sku_id = this.dataDetails.order_goods_list[0].sku_id
          this.canvasMessage.activity_id = this.dataDetails.order_goods_list[0].activity_id
          await this.syncUniApi('share', {
            'provider': 'weixin',
            'scene': 'WXSceneSession',
            'type': '0',
            'title': '推荐一个好物给您',
            'href': this.shearInfo.url,
            'summary': this.canvasMessage.name,
            'imageUrl': this.canvasMessage.thumb
          })
        } else if (type == '2') {
          this.canvasMessage.name = this.dataDetails.order_goods_list[0].goods_name
          this.canvasMessage.thumb = this.dataDetails.order_goods_list[0].goods_thumb
          this.canvasMessage.goods_id = this.dataDetails.order_goods_list[0].goods_id
          this.canvasMessage.sku_id = this.dataDetails.order_goods_list[0].sku_id
          this.canvasMessage.activity_id = this.dataDetails.order_goods_list[0].activity_id
          await this.syncUniApi('share', {
            'provider': 'weixin',
            'scene': 'WXSceneTimeline',
            'type': '0',
            'title': '推荐一个好物给您',
            'href': this.shearInfo.url,
            'summary': this.canvasMessage.name,
            'imageUrl': this.canvasMessage.thumb
          })
        } else if (type == '3') {
          this.canvasMessage.name = this.dataDetails.order_goods_list[0].goods_name
          this.canvasMessage.thumb = this.dataDetails.order_goods_list[0].goods_thumb
          this.canvasMessage.goods_id = this.dataDetails.order_goods_list[0].goods_id
          this.canvasMessage.sku_id = this.dataDetails.order_goods_list[0].sku_id
          this.canvasMessage.activity_id = this.dataDetails.order_goods_list[0].activity_id
          //请求方法
          //数据验证

          let datashearInfo = await this.$api.get(global.apiUrls.post642402f366fd4, {
            goods_id: this.canvasMessage.goods_id,
            sku_id: this.canvasMessage.sku_id,
            activity_id: this.canvasMessage.activity_id
          });

          if (datashearInfo.data.code != 1) {
            this.$message.info(datashearInfo.data.msg);
            return
          }
          let infoshearInfo = datashearInfo.data;
          this.shearInfo = infoshearInfo.data

          this.copyText(this.shearInfo.url);
        } else if (type == '4') {
          this.canvasMessage.name = this.dataDetails.order_goods_list[0].goods_name
          this.canvasMessage.thumb = this.dataDetails.order_goods_list[0].goods_thumb
          this.canvasMessage.goods_id = this.dataDetails.order_goods_list[0].goods_id
          this.canvasMessage.sku_id = this.dataDetails.order_goods_list[0].sku_id
          this.canvasMessage.activity_id = this.dataDetails.order_goods_list[0].activity_id
          this.shearImg = await this.painterGenerateImages('painter1691111604909', 'painterParam1691111604909');
          //请求方法
          //数据验证

          let datashearInfo = await this.$api.get(global.apiUrls.post642402f366fd4, {
            goods_id: this.canvasMessage.goods_id,
            sku_id: this.canvasMessage.sku_id,
            activity_id: this.canvasMessage.activity_id
          });

          if (datashearInfo.data.code != 1) {
            this.$message.info(datashearInfo.data.msg);
            return
          }
          let infoshearInfo = datashearInfo.data;
          this.shearInfo = infoshearInfo.data

          this.popupShow1680503276268 = false;
          this.popupShow1679645673274 = true;
        }
      },
      //保存图片
      SavePictureFunc() {
        if (this.appSystemIdentification == 'IOS' || this.appSystemIdentification == 'Android') {
          uni.saveImageToPhotosAlbum({
            filePath: this.shearImg,
            success: (res) => {
              console.log(res)
              this.$message.info(global.i18n.t('保存成功'))
              this.close()
            },
          })
        } else if (this.appSystemIdentification == 'Web') {
          uni.downloadFile({
            url: this.shearImg,
            success: (res) => {
              console.log(res)
              if (res.statusCode === 200) {
                console.log('下载成功');
                var oA = document.createElement("a");
                oA.download = ''; // 设置下载的文件名，默认是'下载'
                oA.href = res.tempFilePath; //临时路径再保存到本地
                document.body.appendChild(oA);
                oA.click();
                oA.remove(); // 下载之后把创建的元素删除
              }

            }
          });
        } else if (this.appSystemIdentification == 'Wechat') {
          uni.getImageInfo({
            src: this.shearImg,
            success: (res) => {
              uni.saveImageToPhotosAlbum({
                filePath: res.path,
                success: (ress) => {
                  this.$message.info(this.$t('保存成功'))
                },
                fail: (err) => {
                  console.log(err);
                  this.$message.info(this.$t('保存失败'))
                }
              })
            }
          })
        }
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: url(image-path('22.png')) no-repeat;
    background-size: 100% auto;
  }

  .formed_flex_0 {
    background: url(image-path('22.png')) no-repeat;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .formed_fd0_0_c2 {
    padding: 0rpx 0rpx 0rpx 0rpx;
    width: 200rpx;
  }

  .formed_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: #fff;
  }

  .formed_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #fff;
    font-weight: 500;
  }

  .formed_fd0_0_c0 {
    width: 200rpx;
  }

  .formed_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .formed_fd2_0_c2_c0 {
    background: #B82441;
    border-radius: 44rpx 44rpx 44rpx 44rpx;
    font-size: 32rpx;
    color: #fff;
    width: 308rpx;
    height: 80rpx;
    line-height: 80rpx;
    font-weight: 500;
  }

  .formed_fd2_0_c2 {
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .formed_fd2_0_c1_c0_c0 {
    width: 580rpx;
    height: 778rpx;
    border-radius: 16rpx;
  }

  .formed_fd2_0_c1_c0 {
    border: 1px solid rgba(238, 238, 238, 1);
    background: #FFFFFF;
    width: 580rpx;
    margin: 0rpx 0rpx 32rpx 0rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    background-size: 100% auto !important;
    position: relative;
  }

  .formed_fd2_0_c0_c1_c1 {
    font-size: 36rpx;
    font-weight: 500;
    color: #333333;
    margin: 0rpx 24rpx 0rpx 24rpx;
    line-height: 50rpx;
  }

  .formed_fd2_0_c0_c1_c0 {
    width: 32rpx;
    height: 10rpx;
  }

  .formed_fd2_0_c0_c0 {
    width: 40rpx;
    height: 40rpx;
  }

  .formed_fd2_0_c0 {
    margin: 36rpx 0rpx 33rpx 0rpx;
  }

  .formed_fd2_0 {
    background: #fff;
    background-size: 100% auto !important;
    border-radius: 32rpx 32rpx 0rpx 0rpx;
    padding: 0rpx 32rpx 40rpx 32rpx;
  }

  .formed_flex_3 {
    padding: 5rpx 24rpx 32rpx 24rpx;
  }

  .formed_fd3_5_c0 {
    background: var(--benbenbgColor7);
    border-radius: 50rpx 50rpx 50rpx 50rpx;
    font-size: 24rpx;
    color: var(--benbenFontColor3);
    width: 170rpx;
    height: 60rpx;
    line-height: 60rpx;
    font-weight: 400;
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .formed_fd3_5 {
    background: var(--benbenbgColor1);
    width: 750rpx;
    height: 100rpx;
    padding: 0rpx 24rpx 0rpx 24rpx;
    position: fixed;
    left: 0rpx;
    bottom: calc(0rpx + var(--window-bottom));
    background-size: 100% auto !important;
  }

  .formed_fd3_4_c3_c2_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333333;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    max-width: 150rpx;
  }

  .formed_price1_fd3_4_c3_c1_c2 {
    font-size: 24rpx;
  }

  .formed_fd3_4_c3_c1_c2 {
    color: var(--benbenFontColor7);
    font-weight: 400;
    font-size: 24rpx;
  }

  .formed_fd3_4_c3_c1_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: var(--benbenFontColor7);
  }

  .formed_fd3_4_c3_c0_c0 {
    margin: 0rpx 72rpx 0rpx 0rpx;
    font-size: 24rpx;
    font-weight: 400;
    color: #999999;
  }

  .formed_fd3_4_c2_c2 {
    font-size: 24rpx;
    font-weight: 400;
    color: var(--benbenFontColor4);
  }

  .formed_fd3_4_c2_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 43rpx 0rpx 72rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .formed_fd3_4_c2 {
    line-height: 34rpx;
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .formed_fd3_4_c1_c1 {
    color: #333333;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 40rpx;
  }

  .formed_fd3_4_c1_c0 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 33rpx;
    margin: 0rpx 72rpx 0rpx 0rpx;
  }

  .formed_fd3_4_c0_c1 {
    font-size: 32rpx;
    font-weight: 600;
    color: #333333;
  }

  .formed_fd3_4_c0_c0 {
    background: var(--benbenbgColor7);
    width: 6rpx;
    height: 30rpx;
    margin: 0rpx 15rpx 0rpx 0rpx;
    transform: scaleX(0.5);
  }

  .formed_fd3_4_c0 {
    border-bottom: 1px solid #eee;
    padding: 0rpx 0rpx 24rpx 0rpx;
    margin: 0rpx 0rpx 0rpx 0rpx;
  }

  .formed_fd3_4 {
    background: #fff;
    background-size: 100% auto !important;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 32rpx 24rpx 32rpx 24rpx;
    margin: 12rpx 0rpx 120rpx 0rpx;
  }

  .formed_price2_fd3_3_c3_c2 {
    font-size: 22rpx;
  }

  .formed_fd3_3_c3_c2 {
    color: var(--benbenFontColor7);
    font-weight: 700;
    font-size: 22rpx;
  }

  .formed_fd3_3_c3_c1 {
    font-size: 20rpx;
    font-weight: 700;
    color: var(--benbenFontColor7);
  }

  .formed_fd3_3_c3_c0 {
    font-size: 24rpx;
    font-weight: 500;
    color: rgba(153, 153, 153, 1);
    margin: 0rpx 8rpx 0rpx 0rpx;
  }

  .formed_fd3_3_c3 {
    padding: 32rpx 0rpx 0rpx 0rpx;
  }

  .formed_fd3_3_c2 {
    margin: 32rpx 0rpx 32rpx 0rpx;
  }

  .formed_fd3_3_c1_c2 {
    color: #333333;
    font-weight: 700;
    font-size: 28rpx;
    line-height: 42rpx;
  }

  .formed_fd3_3_c1_c1 {
    font-size: 28rpx;
    font-weight: 700;
    color: #333333;
    line-height: 42rpx;
  }

  .formed_fd3_3_c1_c0 {
    font-size: 28rpx;
    font-weight: 500;
    color: #333333;
    margin: 0rpx auto 0rpx 0rpx;
  }

  .formed_fd3_3_c0_c0_c1_c2_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: #999999;
  }

  .formed_price2_fd3_3_c0_c0_c1_c2_c0_c1 {
    font-size: 28rpx;
  }

  .formed_price1_fd3_3_c0_c0_c1_c2_c0_c1 {
    font-size: 32rpx;
  }

  .formed_fd3_3_c0_c0_c1_c2_c0_c1 {
    color: var(--benbenFontColor0);
    font-weight: 600;
  }

  .formed_fd3_3_c0_c0_c1_c2_c0_c0 {
    color: var(--benbenFontColor0);
    font-size: 20rpx;
    font-weight: 700;
    line-height: 30rpx;
    margin: 4rpx 0rpx 0rpx 0rpx;
  }

  .formed_fd3_3_c0_c0_c1_c1 {
    font-size: 22rpx;
    font-weight: 400;
    color: #999999;
    margin: 8rpx 0rpx auto 0rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-height: 36rpx;
  }

  .formed_fd3_3_c0_c0_c1_c0 {
    font-size: 28rpx;
    font-weight: 600;
    color: #333333;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-height: 42rpx;
  }

  .formed_fd3_3_c0_c0_c1 {
    margin: 0rpx 0rpx 0rpx 34rpx;
  }

  .formed_fd3_3_c0_c0_c0 {
    width: 200rpx;
    height: 200rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .formed_fd3_3_c0_c0 {
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .formed_fd3_3_c0 {
    border-bottom: 1px solid #eee;
    padding: 0rpx 0rpx 32rpx 0rpx;
  }

  .formed_fd3_3 {
    background: #fff;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 0rpx 24rpx 32rpx 24rpx;
    background-size: 100% auto !important;
    margin: 12rpx 0rpx 12rpx 0rpx;
  }

  .formed_fd3_2_c1_c1_c0_c3 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333333;
  }

  .formed_fd3_2_c1_c1_c0_c0 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 5rpx 0rpx 0rpx;
  }

  .formed_fd3_2_c1_c1 {
    margin: 19rpx 0rpx 0rpx 0rpx;
  }

  .formed_fd3_2_c1_c0_c2 {
    font-size: 32rpx;
    font-weight: 700;
    color: #333333;
    margin: 0rpx 0rpx 0rpx 16rpx;
    line-height: 40rpx;
  }

  .formed_fd3_2_c1_c0_c1 {
    font-size: 32rpx;
    font-weight: 700;
    color: #333333;
    margin: 0rpx 0rpx 0rpx 16rpx;
    max-width: 200rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-height: 40rpx;
  }

  .formed_fd3_2_c1_c0_c0 {
    border: 1px solid var(--benbenbdColor8);
    background: rgba(105, 139, 255, 0.08);
    border-radius: 8rpx 8rpx 8rpx 8rpx;
    padding: 1rpx 16rpx 0rpx 16rpx;
    font-size: 23rpx;
    font-weight: 500;
    color: var(--benbenFontColor4);
  }

  .formed_fd3_2_c1 {
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .formed_fd3_2_c0 {
    width: 60rpx;
    height: 60rpx;
  }

  .formed_fd3_2 {
    background: #FFFFFF;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    margin: 24rpx 0rpx 12rpx 0rpx;
    padding: 40rpx 21rpx 40rpx 24rpx;
  }

  .formed_fd3_1_c1_c0_c1 {
    background: var(--benbenbgColor2);
    line-height: 40rpx;
    font-size: 24rpx;
    color: #fff;
    width: 80rpx;
    position: absolute;
    top: 0rpx;
  }

  .formed_fd3_1_c1_c0_c0 {
    width: 104rpx;
    height: 104rpx;
    border-radius: 60rpx 60rpx 60rpx 60rpx;
  }

  .formed_fd3_1_c1_c0 {
    position: relative;
    margin: 0rpx 44rpx 0rpx 44rpx;
  }

  .formed_fd3_1_c1 {
    margin: 48rpx 0rpx 0rpx 0rpx;
  }

  .formed_fd3_1_c0_c1_c4_c0 {
    background: #FFFFFF;
  }

  .formed_fd3_1_c0_c1_c4 {
    color: var(--benbenFontColor5);
    font-size: 24rpx;
  }

  .formed_fd3_1_c0_c1_c1 {
    color: var(--benbenFontColor7);
    font-size: 24rpx;
    font-weight: 400;
    line-height: 33rpx;
  }

  .formed_fd3_1_c0_c1_c0 {
    color: #333333;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 33rpx;
  }

  .formed_fd3_1_c0_c0 {
    width: 24rpx;
    height: 24rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .formed_fd3_1 {
    background: #FFFFFF;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 32rpx 32rpx 40rpx 32rpx;
  }

  .formed_fd3_0_c1 {
    width: 140rpx;
    height: 140rpx;
  }

  .formed_fd3_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 700;
    color: #FFFFFF;
  }

  .formed_fd3_0 {
    padding: 12rpx 0rpx 12rpx 0rpx;
  }

  .formed_fd4_0_c1_c0_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333;
  }

  .formed_fd4_0_c1_c0_c0 {
    width: 80rpx;
    height: 80rpx;
    border-radius: 40rpx 40rpx 40rpx 40rpx;
    margin: 0rpx 0rpx 16rpx 0rpx;
  }

  .formed_fd4_0_c1 {
    padding: 0rpx 0rpx 58rpx 0rpx;
  }

  .formed_fd4_0_c0_c2_c0 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 20rpx 20rpx 20rpx 20rpx;
  }

  .formed_fd4_0_c0_c2 {
    margin: 0rpx 2rpx 0rpx 0rpx;
  }

  .formed_fd4_0_c0_c1_c1 {
    font-size: 32rpx;
    font-weight: 700;
    color: #333;
    margin: 0rpx 16rpx 0rpx 16rpx;
  }

  .formed_fd4_0_c0_c1_c0 {
    width: 32rpx;
    height: 10rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .formed_fd4_0_c0_c1 {
    padding: 40rpx 0rpx 48rpx 0rpx;
  }

  .formed_fd4_0_c0_c0 {
    width: 40rpx;
  }

  .formed_fd4_0_c0 {
    padding: 0rpx 13rpx 0rpx 0rpx;
  }

  .formed_fd4_0 {
    background: #fff;
    background-size: 100% auto !important;
    border-radius: 24rpx 24rpx 0rpx 0rpx;
    padding: 0rpx 32rpx 0rpx 32rpx;
  }
</style>